/**
 * (created at 2011-2-17)
 */
package qiushuo.mysqlparser.ast.statement;

import java.util.List;

import qiushuo.mysqlparser.ast.expression.Expression;
import qiushuo.mysqlparser.generator.SQLType;

/**
 * @author <a href="mailto:QiuShuo1985@gmail.com">QIU Shuo</a>
 */
public class DALShowStatement implements Statement {
    private final Show show;
    private final boolean property1;
    private final String name1;
    private final String name2;
    private final Expression info1;
    private final Expression info2;
    private final Expression info3;
    private final Expression info4;
    private final List<Type> typeList;
    private final Expression like;
    private final Expression where;

    public static enum Type {
        ALL,
        BLOCK_IO,
        CONTEXT_SWITCHES,
        CPU,
        IPC,
        MEMORY,
        PAGE_FAULTS,
        SOURCE,
        SWAPS
    }

    /**
     * 锟斤拷锟斤拷锟斤拷锟叫ｏ拷锟斤拷一锟斤拷为false锟斤拷锟节讹拷为true锟斤拷没锟斤拷为false锟斤拷锟斤拷为true
     * 
     * <pre>
     *     SHOW AUTHORS
     *     SHOW {BINARY | MASTER} LOGS
     *     SHOW BINLOG EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]
     *     SHOW CHARACTER SET [like_or_where]
     *     SHOW COLLATION [like_or_where]
     *     SHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [like_or_where]
     *     SHOW CONTRIBUTORS
     *     SHOW CREATE DATABASE db_name
     *     SHOW CREATE EVENT event_name
     *     SHOW CREATE FUNCTION func_name
     *     SHOW CREATE PROCEDURE proc_name
     *     SHOW CREATE TABLE tbl_name
     *     SHOW CREATE TRIGGER trigger_name
     *     SHOW CREATE VIEW view_name
     *     SHOW DATABASES [like_or_where]
     *     SHOW ENGINE engine_name {STATUS | MUTEX}
     *     SHOW [STORAGE] ENGINES
     *     SHOW ERRORS [LIMIT [offset,] row_count]
     *     SHOW EVENTS
     *     SHOW FUNCTION CODE func_name
     *     SHOW FUNCTION STATUS [like_or_where]
     *     SHOW GRANTS FOR user
     *     SHOW INDEX FROM tbl_name [FROM db_name]
     *     SHOW MASTER STATUS
     *     SHOW OPEN TABLES [FROM db_name] [like_or_where]
     *     SHOW PLUGINS
     *     SHOW PROCEDURE CODE proc_name
     *     SHOW PROCEDURE STATUS [like_or_where]
     *     SHOW PRIVILEGES
     *     SHOW [FULL] PROCESSLIST
     *     SHOW PROFILE [types] [FOR QUERY n] [OFFSET n] [LIMIT n]
     *     SHOW PROFILES
     *     SHOW SLAVE HOSTS
     *     SHOW SLAVE STATUS
     *     SHOW [GLOBAL | SESSION] STATUS [like_or_where]
     *     SHOW TABLE STATUS [FROM db_name] [like_or_where]
     *     SHOW [FULL] TABLES [FROM db_name] [like_or_where]
     *     SHOW TRIGGERS [FROM db_name] [like_or_where]
     *     SHOW [GLOBAL | SESSION] VARIABLES [like_or_where]
     *     SHOW WARNINGS [LIMIT [offset,] row_count]
     * </pre>
     */
    public static enum Show {
        AUTHORS,
        LOGS,
        BINLOG,
        CHARACTER,
        COLLATION,
        COLUMNS,
        CONTRIBUTORS,
        CREATE_DATABASE,
        CREATE_EVENT,
        CREATE_FUNCTION,
        CREATE_PROCEDURE,
        CREATE_TABLE,
        CREATE_TRIGGER,
        CREATE_VIEW,
        DATABASES,
        ENGINE,
        ENGINES,
        ERRORS,
        EVENTS,
        FUNCTION_CODE,
        FUNCTION_STATUS,
        GRANTS,
        INDEX,
        MASTER,
        OPEN_TABLES,
        PLUGINS,
        PROCEDURE_CODE,
        PROCEDURE_STATUS,
        PRIVILEGES,
        PROCESSLIST,
        PROFILE,
        PROFILES,
        SLAVE_HOSTS,
        SLAVE_STATUS,
        STATUS,
        TABLE_STATUS,
        TABLES,
        TRIGGERS,
        VARIABLES,
        WARNINGS

    }

    public DALShowStatement(Show show, boolean property1, String name1, String name2, Expression info1,
                            Expression info2, Expression info3, Expression info4, List<Type> typeList, Expression like,
                            Expression where) {
        super();
        this.show = show;
        this.property1 = property1;
        this.name1 = name1;
        this.name2 = name2;
        this.info1 = info1;
        this.info2 = info2;
        this.info3 = info3;
        this.info4 = info4;
        this.typeList = typeList;
        this.like = like;
        this.where = where;
    }

    @Override
    public String generateSql(SQLType type) {
        // QS_TODO gen sql
        throw new UnsupportedOperationException("not implemented yet");
    }

}
